package c.c.k.controller;

import c.c.k.service.*;
import c.c.k.util.StockContants;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *
 */
@RestController("")
public class BizController {
    @Autowired
    private UserStockService userStockService;

    @GetMapping("/biz/addStock")
    public Object addStock(Long stockId){
        userStockService.addUserStock(StockContants.DEF_USER_ID, stockId);
        return "ok";
    }

    @GetMapping("/biz/delStock")
    public Object delStock(Long stockId){
        userStockService.delUserStock(StockContants.DEF_USER_ID, stockId);
        return "ok";
    }
}
